package com.example.demo.aop.redis;

import redis.clients.jedis.Jedis;

import java.util.List;

/**
 * @author 许路路
 */
public class RedisConsumer {

    public static void main(String[] args) {
        Jedis jedisUtils = JedisUtils.getJedis();
        while (true) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            List<String> values = jedisUtils.brpop(0, JedisUtils.TEST_KEY);
            jedisUtils.llen(JedisUtils.TEST_KEY);
            System.out.println("消费者获取到：" + values);
        }
    }

}
